<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10.流程控制-分支结构.总练习2</title>
    <script>
        //比较两个数大小
        //依次输入2个值，最后弹出最大的那个值
        var num1 = prompt('请输入第一个数字');
        var num2 = prompt('请输入第二个数字');
        if (num1 > num2) {
            alert(num1);
        } else if (num2 > num1) {
            alert(num2);
        } else {
            alert(num1 + '=' + num2)
        }
    </script>
</head>

<body>

</body>

</html>